package cloud.tianai.neuron.active.impl;

import cloud.tianai.neuron.active.ActiveFun;

public class Sigmoid implements ActiveFun {
    private double in = -1.0;

    public Sigmoid(double in) {
        this.in = in;
    }

    public Sigmoid() {
    }

    @Override
    public double calc(double value) {
        return 1.0 / ( 1.0 + Math.exp(in * value));
    }
}
